<!-- 收藏管理界面 -->
<template>
  <div id="bg">
    
    <div class="kuang">
      <h2> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;收藏管理界面</h2>
    <ul>
      <li v-for="item in favorites" :key="item.id">
        {{ item.name }}
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<button @click="removeFavorite(item.id)">取消收藏</button><br><br>
      </li>
    </ul>
  </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      favorites: [
        { id: 1, name: '贪吃蛇' },
        { id: 2, name: '五子棋' },
        { id: 3, name: '俄罗斯方块' }
      ]
    };
  },
  methods: {
    removeFavorite(id) {
      this.favorites = this.favorites.filter(item => item.id !== id);
    }
  }
};
</script>



<style>
.kuang{
  border-radius: 3%;
  width: 373px;
  height: 210px;
  background-color: rgba(255, 255, 255, 0.35);
  border: 0px;
  top: 30%;
  position: absolute;
  left: 38%;
}
#bg {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0px;
  left: 0px;
  /* 渐变 */
  background-image: url("/src/views/photo/login.jpg");
  background-size: 100%;
}</style>